<div class="wrapper col0">
  <div id="topbar">
    <div id="slidepanel">
      <div class="topbox">
        <h2>Staff Login Here</h2>
        <form action="control/staff-proc-login.php" method="post">
          <fieldset>
            <legend>Staff Login Form</legend>
            <label for="staffname">Username:
              <input type="text" name="staffname" id="staffname" value="" />
            </label>
            <label for="staffpass">Password:
              <input type="password" name="staffpass" id="staffpass" value="" />
            </label>
            <p>
              <input type="submit" name="stafflogin" id="stafflogin" value="Login" />
              &nbsp;
              <input type="reset" name="staffreset" id="staffreset" value="Reset" />
            </p>
          </fieldset>
        </form>
      </div>
      <div class="topbox">
        <h2>Teachers Login Here</h2>
        <form action="control/faculty-proc-login.php" method="post">
          <fieldset>
            <legend>Teachers Login Form</legend>
            <label for="teachername">Username:
              <input type="text" name="facultyname" id="teachername" value="" />
            </label>
            <label for="teacherpass">Password:
              <input type="password" name="facultypass" id="teacherpass" value="" />
            </label>
            <p>
              <input type="submit" name="teacherlogin" id="teacherlogin" value="Login" />
              &nbsp;
              <input type="reset" name="teacherreset" id="teacherreset" value="Reset" />
            </p>
          </fieldset>
        </form>
      </div>
      <div class="topbox last">
        <h2>Students Login Here</h2>
        <form action="control/student-proc-login.php" method="post">
          <fieldset>
            <legend>Students Login Form</legend>
            <label for="studentname">Username:
              <input type="text" name="studentname" id="studentname" value="" />
            </label>
            <label for="studentpass">Password:
              <input type="password" name="studentpass" id="studentpass" value="" />
            </label>
            <p>
              <input type="submit" name="pupillogin" id="pupillogin" value="Login" />
              &nbsp;
              <input type="reset" name="pupilreset" id="pupilreset" value="Reset" />
            </p>
          </fieldset>
        </form>
      </div>
      <br class="clear" />
    </div>
    <div id="loginpanel">
    <?php
    if(isset($_SESSION['username'])){
        ?>
        <ul>
        <li class="left">Welcome &raquo;</li>
        <li class="right" id="toggle"><p><? echo "".$_SESSION['username'] ?></p></li>
      </ul>
        <?php
    }else{
        if(isset($_SESSION['error'])){
			echo $_SESSION['error'];
			unset($_SESSION['error']);
		}
    ?>  
      <ul>
        <li class="left">Log In Here &raquo;</li>
        <li class="right" id="toggle"><a id="slideit" href="#slidepanel">Open Panel</a><a id="closeit" style="display: none;" href="#slidepanel">Close Panel</a></li>
      </ul>
      <?php } ?>
    </div>
    <br class="clear" />
  </div>
</div>
